<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>title</title>
  <style>
    .map {
      width: 800px;
      height: 600px;
      background-color: #CCC;
      position: absolute;
      margin-left:25%;
    }
    #message {
      width: 300px;
      height: 200px;
      background-color: grey;
      margin-top: 150px;
      margin-left: 250px;
      position: relative;
      text-align: center;
      line-height: 200px;
      font-size: 36px;
      display: none;
    }
  </style>
</head>
<body>
<!--画出地图,设置样式-->
<div class="map">
  <div id="message">Game over!</div>
</div>

<script src="food.js"></script>
<script src="Snake.js"></script>
<script src="Game.js"></script>
<script>

  //初始化游戏对象
  var oDiv=document.getElementsByClassName('map')[0];
  console.log(this)
  var gm = new Game(oDiv);
  //初始化游戏---开始游戏
  gm.init();
  console.log(Math.random())

  // y git test
  console.log('hello')
  console.log('hello1')
  console.log('hello2')


</script>
</body>
</html>